//
// Created on 2024/3/12.
//
// Node APIs are not fully supported. To solve the compilation error of the interface cannot be found,
// please include "napi/native_api.h".

#ifndef OHOS_TEXTINPUTINFO_H
#define OHOS_TEXTINPUTINFO_H

#include <string>
class FontColor {
public:
    float r;
    float g;
    float b;
    float a;
    FontColor() {
        r = 0;
        g = 0;
        b = 0;
        a = 1;
    }
    FontColor(int _r, int _g, int _b, int _a) {
        r = _r;
        g = _g;
        b = _b;
        a = _a;
    }
};

class TextInputInfo {
public:
    std::string inputType;
    std::string returnType;
    bool visible;
    bool isBold;
    std::string align;
    bool editable;
    
//font properties
public:
    float fontSize;
    FontColor fontColor;
    std::string text;
    std::string fontPath;
    
//placeholder properties
public:
    int placeholderFontSize;
    FontColor placeholderFontColor;
    std::string placeHolder;
    std::string placeHolderFontPath;
    static constexpr int maxLength = 256;
    
    TextInputInfo() : 
    text(""), placeHolder(""), inputType("normal"), returnType("done"), align("left"), visible(true), editable(true), isBold(false)
    {
    }
};

class TextAreaInfo {
public:
    std::string inputType;
    std::string returnType;
    bool visible;
    bool isBold;
    std::string align;
    bool editable;

    // font properties
public:
    float fontSize;
    FontColor fontColor;
    std::string text;
    std::string fontPath;

    // placeholder properties
public:
    int placeholderFontSize;
    FontColor placeholderFontColor;
    std::string placeHolder;
    std::string placeHolderFontPath;
    static constexpr int maxLength = 256;

    TextAreaInfo()
        : text(""), placeHolder(""), inputType("normal"), returnType("next"), align("left"), visible(true),
          editable(false), isBold(false) {}
};


#endif //OHOS_TEXTINPUTINFO_H
